<?php
/**
 * Created by PhpStorm.
 * User: ^2_3^王尔贝
 * Date: 2020/7/13
 * Time: 04:26
 */

namespace app\model;

use think\Model;

/**
 * 模型DemoPosts
 * Class DemoPosts
 * @package app\model
 * @author ^2_3^王尔贝
 */
class DemoPosts extends Model
{
    /**
     * 数据库连接
     * @var string
     * @author ^2_3^王尔贝
     */
    protected $connection = 'mysql';

    /**
     * 数据表(全名)
     * @var string
     * @author ^2_3^王尔贝
     */
    protected $table = 'demo_posts';

    /**
     * 数据表
     * @var string
     * @author ^2_3^王尔贝
     */
    protected $name = 'demo_posts';

    /**
     * 表主键
     * @var string
     * @author ^2_3^王尔贝
     */
    protected $pk = 'id';

    /**
     * 开启自动写入时间戳字段
     * @var bool
     * @author ^2_3^王尔贝
     */
    protected $autoWriteTimestamp = true;

    /**
     * 自定义时间戳字段名
     * @var string
     * @author ^2_3^王尔贝
     */
    protected $createTime = 'created_at';
    protected $updateTime = 'updated_at';

}